<style type="text/css">ul.mycon li{ width:65px;}</style>
<script type="text/javascript" src="js/publishbox.js"></script>
<div id="zz_main_publish">
<div id="tigBox_2" class="tigBox_2">用<a href="javascript:" onClick="thread_insert()" style="cursor:pointer">#关键词#</a>给微博添加话题，方便他人关注话题</div>
<div class="issueBox">
<div class="fbqCount">
<div class="fLeft">
<!--{if $this->Get[mod] == 'member'}-->
<!--{eval $content = '#新人报到# 我是'.$this->Config[site_name].'新加入的成员@'.MEMBER_NICKNAME.' ，欢迎大家来关注我！';}-->
所有关注我的人将看到我分享的信息
<!--{else}-->
<span>
<!--<A href="index.php?mod=profile&code=invite" style="cursor:pointer">邀请</A>更多人-->
<div class="imgs"></div>
<!--{/if}-->
</div>
<ul class="mycon">
<li>文明上网、</li>
<li>诚信发言，</li>
<li>还可以输入</li>
<li style="width:auto"><span id="wordCheck" style='font-size: 16px;line-height: 30px;color: #67a61d;'>{conf topic_length}</span></li>
<li style="width:14px;">字</li>
</ul>
</div>
<div class="box_1" style="display:block">
<!--{eval $i_already_value = $content ? $content : $this->Config[today_topic];}-->
<script type="text/javascript">
var __I_ALREADY_VALUE__ = '{$i_already_value}';
</script>
<textarea name="content" id="i_already"  onkeyup="javascript:checkWord({conf topic_length},event,'wordCheck')" onkeydown="ctrlEnter(event, 'publishSubmit')">{$i_already_value}</textarea>
<input name="topic_type" type="hidden" id="topic_type" value="{$this->Get[type]}" />

<!--应用 Begin-->
<input name="item" type="hidden" id="mapp_item" value="{$this->item}" />
<input name="item_id" type="hidden" id="mapp_item_id" value="{$this->item_id}" />
<!--应用 End-->

</div>   
  <div class="box_3">
	<script type="text/javascript">
	 $(document).ready(function() {	 	
		
	 //图片 
	 $(".menu_tqb_c").click(function(){
	 $(".menu_tqb").show();
	 $(".menu_spb").hide();
	 $('#showface').hide();
	 $('.menu_htb').hide();
	 $('.menu_vsb').hide();
	 $(".menu_wqb").hide();
	 $(".menu_hdb").hide();
	 $(".menu_cwb").hide();
	 });
	 $('#pubImg').click(function(){
	 $("#publisher_file").style.posLeft=event.x-offsetWidth/2;$("#publisher_file").style.posTop=event.y-offsetHeight/2;});
	 $(".menu_tqb_c1").click(function(){$(".menu_tqb").hide();});
	 $(".menu_tqb_c2").click(function(){$(".menu_tqb").hide();});
	 $("#publishSubmit").click(function(){$(".menu_tqb").hide();});
	 //视频
	 $(".menu_spb_c").click(function(){
	 $(".menu_spb").show();
	 $(".menu_tqb").hide();
	 $('#showface').hide();
	 $('.menu_htb').hide();
	 $('.menu_vsb').hide();
	 $(".menu_wqb").hide();
	 $(".menu_hdb").hide();
	 $(".menu_cwb").hide();
	 });
	 $(".menu_spb_c1").click(function(){$(".menu_spb").hide();});
	 //表情
	 $(".menu_bqb_c").click(function(){
	 $("#showface").show();
	 $(".menu_tqb").hide();
	 $(".menu_spb").hide();
	 $('.menu_htb').hide();
	 $('.menu_vsb').hide();
	 $(".menu_wqb").hide();
	 $(".menu_hdb").hide();
	 $(".menu_cwb").hide();
	 });
	 $('#showface').click(function(){return false;});
	 //活动
	 $(".menu_htb_c").click(function(){
	 $(".menu_htb").show();
	 $(".menu_spb").hide();
	 $(".menu_tqb").hide();
	 $('#showface').hide();
	 $('.menu_vsb').hide();
	 $(".menu_wqb").hide();
	 $(".menu_hdb").hide();
	 $(".menu_cwb").hide();
	 });
	 $('.menu_htb').click(function(){return false;});
	 //投票
	 $(".menu_vsb_c").click(function(){
	 getVoteAvtivityFromIndex('vote_publish', 'con_vote_content_1');
	 $(".menu_vsb").show();
	 $(".menu_tqb").hide();
	 $(".menu_spb").hide();
	 $('#showface').hide();
	 $('.menu_htb').hide();
	 $(".menu_wqb").hide();
	 $(".menu_hdb").hide();
	 $(".menu_cwb").hide();
	 });
	 $(".menu_vsb_c1").click(function(){$(".menu_vsb").hide();});
	 //活动
	 $(".menu_hdb_c").click(function(){
	 getEventPost();
	 $(".menu_hdb").show();
	 $(".menu_vsb").hide();
	 $(".menu_tqb").hide();
	 $(".menu_spb").hide();
	 $('#showface').hide();
	 $('.menu_htb').hide();
	 $(".menu_wqb").hide();
	 $(".menu_cwb").hide();
	 });
	 $(".menu_hdb_c1").click(function(){$(".menu_hdb").hide();});
	 
	 //微群
	 $(".menu_wqb_c").click(function(){
		 getMyQun();
		 $(".menu_wqb").show();
		 $(".menu_tqb").hide();
		 $(".menu_spb").hide();
		 $('#showface').hide();
		 $('.menu_htb').hide();
		 $(".menu_vsb").hide();
		 $(".menu_hdb").hide();
		 $(".menu_cwb").hide();
	 });
	 $(".menu_wqb_c1").click(function(){$(".menu_wqb").hide();});
	 
	 //长文本
	 $(".menu_cwb_c").click(function(){
		 get_longtext_info();
		 $(".menu_cwb").show();
		 $(".menu_tqb").hide();
		 $(".menu_spb").hide();
		 $('#showface').hide();
		 $('.menu_htb').hide();
		 $(".menu_vsb").hide();
		 $(".menu_hdb").hide();
		 $(".menu_wqb").hide();
	 });
	 $(".menu_cwb_c1").click(function(){$(".menu_cwb").hide();});
	 
	 //分类
	 $(".menu_xb_c").click(function(){
	 getClassPost();
	 $(".menu_xb").show();
	 $(".menu_wqb").hide();
	 $(".menu_tqb").hide();
	 $(".menu_spb").hide();
	 $('#showface').hide();
	 $('.menu_htb').hide();
	 $(".menu_vsb").hide();
	 });
	 $(".menu_xb_c1").click(function(){$(".menu_xb").hide();});
	 
});

//-----------------------------------
function setTab(name,cursel,n){
	for(i=1;i<=n;i++){
	var menu=document.getElementById(name+i);
	var con=document.getElementById("con_"+name+"_"+i);
	menu.className=i==cursel?"vhover":"";
	con.style.display=i==cursel?"block":"none";
}
}

function setTab1(name,cursel,n){
	for(i=1;i<=n;i++){
	var menu=document.getElementById(name+i);
	var con=document.getElementById("con_"+name+"_"+i);
	menu.className=i==cursel?"vhover":"";
	con.style.display=i==cursel?"block":"none";
}
}

function setTab2(name,cursel,n){
	for(i=1;i<=n;i++){
	var menu2=document.getElementById(name+i);
	var con2=document.getElementById("con2_"+name+"_"+i);
	menu2.className=i==cursel?"vhover2":"";
	con2.style.display=i==cursel?"block":"none";
}
}
</script>

	<!-- 图片区块 开始 -->
	<!-- JS引用 开始 -->	   
	<!--{eval $image_uploadify_topic = array();}-->
	<!--{eval $image_uploadify_from = 'topic_publish';}-->
	<!--{eval $image_uploadify_only_js = 1;}-->
		{template "image_uploadify.inc"}
	<!-- JS引用 结束 -->
	<div class="menu">
	<div class="menu_tq" ><b class="menu_tqb_c">图片</b>
	<div class="menu_tqb">
	    <div class="menu_pi insertImgDiv" id="insertImgDiv">
		    <div id="swfUploadDiv"><input type="file" id="publisher_file" name="publisher_file" style="display:none;" />（按ctrl或shift键可一次上传多图）</div>
		    <iframe id="imageUploadifyIframe" name="imageUploadifyIframe" width="0" height="0" marginwidth="0" frameborder="0" src="about:blank" style="display:none;"></iframe>
		    <div id="normalUploadDiv" style="display:none;">
				<form id="normalUploadForm" method="post" action="ajax.php?mod=uploadify&code=image&type=normal" enctype="multipart/form-data" target="imageUploadifyIframe" onsubmit="return normalUploadFormSubmit()">
		    		<input type="file" id="normalUploadFile" name="topic" />
		    		<input type="submit" value="上传" class="tul" />
		    	</form>
		    </div>
		    <i class="menu_tqb_c1"><img src="images/imgdel.gif" title="关闭" /></i>
			<em>
				1、如果您不能上传图片，可以<a href="javascript:;" onclick="imageUploadifyModuleSwitch();">点击这里</a>尝试<span id="uploadDescModuleSpan">普通</span>模式上传 ；<br />
				2、可上传JPG、JPEG、GIF、PNG图片格式（小于2M）； <br />
				3、可直接将网上图片URL地址复制到发布框来发布。
			</em>
			<span id="uploading"></span>
			
			<div class="viewImgDiv" id="viewImgDiv"></div>
		</div>
		<div id="uploadifyQueueDiv" style="display:none;"></div>		
	</div>
	</div>
	</div>
	<!-- 图片区块 结束 -->
	
		
	<div class="menu">
	<div class="menu_sp"><b class="menu_spb_c">视频</b>
	<div class="menu_spb" id="upload_ajax_video">
	<div class="menu_tb"><span style="float:left; padding-left:5px;">支持音乐和视频的站内播放</span><div class="menu_spb_c1"></div></div>
	<p class="menu_p">支持如下视频的站内播放：<a href="http://video.sina.com.cn/" rel="nofollow" target="_blank">新浪</a>、<a href="http://www.youku.com/" rel="nofollow" target="_blank">优酷</a>、<a href="http://v.blog.sohu.com/" rel="nofollow" target="_blank">搜狐</a>、<a href="http://www.ku6.com/" rel="nofollow" target="_blank">酷6</a>、<a href="http://www.tudou.com/" rel="nofollow" target="_blank">土豆</a>，请复制粘帖视频播放页url地址</p>
	  <div id="upload_video_list" class="menu_p" style="display:none;">
		<span id="return_ajax_video_title"></span>
		<span><img id="video_img" src="" width="130" /></span>
		<p>
		<input id="videoid" type="hidden" name="video_id" />
		<span><a href=""onclick="DelVideo('videoid','video_ajax'); return false;" title="删除视频">删除视频</a></span>
		</p>
	  </div>
	  <div id="add_video" class="menu_p" style=" margin-bottom:6px; padding-top:0">
	  <iframe id="upload_video_frame" name="upload_video_frame" width="0" height="0" marginwidth="0" frameborder="0" src="about:blank"></iframe>
	   <form action="ajax.php?mod=topic&code=dovideo" method="post" enctype="multipart/form-data" name="upload_video" id="upload_video" target="upload_video_frame">
		<input name="url" type="text" id="url" class="sc_r_t_a" style=" width:220px; display:inline;"/>
		<input type="submit" name="Submit" value="提交" class="c_b1" />
	   </form>
	  </div>
	</div></div>
	</div>

	<div class="menu">
	<div class="menu_bq" id="editface" ><b class="menu_bqb_c"><a href="javascript:void(0);" onclick="topic_face('showface','i_already','topic_face');return false;">表情</a></b>
	<div id="showface" class="showface"></div>
	</div></div>

	<div class="menu" >
	<div class="menu_ht" id="button_{MEMBER_ID}"><span onclick="get_tag_choose({MEMBER_ID},'my_tag');return false;" class="menu_htb_c">话题</span>
	<div class="menu_htb"><div id="tag_{MEMBER_ID}"></div></div>
	</div>
	</div>

	<!--{eval $vote_setting = ConfigHandler::get('vote');}-->
	<!--{if $vote_setting['vote_open']}-->
	<div class="menu">
	<div class="menu_vs"><b class="menu_vsb_c">投票</b>
	<div class="menu_vsb">
	<div class="menu_vsbox">
	<p class="stitle">
	<b id="vote_content1" class="vhover" onclick="setTab('vote_content',1,3)">新的投票</b>
	<b id="vote_content2" onclick="setTab('vote_content',2,3);getMyVoteList(1);">我发起的投票</b>
	<b id="vote_content3" onclick="setTab('vote_content',3,3);getMyJoinList(1);">我参与的投票</b>
	<sub class="menu_vsb_c1"></sub>
	</p>
	
	<div class="vcontent" id="con_vote_content_1">
	<p>正在加载...</p>
	</div>
	<div class="vcontent vote_conLi" id="con_vote_content_2" style="display:none;">
	<p>正在加载...</p>
	</div>
	<div class="vcontent vote_conLi" id="con_vote_content_3" style="display:none;">
	<p>正在加载...</p>
	</div>
	
	</div>
	</div>
	</div>
	</div>
	<!--{/if}-->
	
	<!-- {eval $event_setting=ConfigHandler::get('event_setting')} -->
	<!-- {if $event_setting == 1} -->
	<div class="menu">
	<div class="menu_hd"><b class="menu_hdb_c">活动</b>
	<div class="menu_hdb">
	<div class="menu_hdbox">
	<p class="stitle">
	<b id="event_content1" class="vhover" onclick="setTab1('event_content',1,3)">新的活动</b>
	<b id="event_content2" onclick="setTab1('event_content',2,3);getMyEventList(1);">我发起的活动</b>
	<b id="event_content3" onclick="setTab1('event_content',3,3);getJoinEventList(1);">我参与的活动</b>
	<sub class="menu_hdb_c1"></sub>
	</p>
	
	<div class="vcontent" id="con_event_content_1">
	<p>正在加载...</p>
	</div>
	<div class="vcontent vote_conLi" id="con_event_content_2" style="display:none;">
	<p>正在加载...</p>
	</div>
	<div class="vcontent vote_conLi" id="con_event_content_3" style="display:none;">
	<p>正在加载...</p>
	</div>
	
	</div>
	</div>
	</div>
	</div>
	<!-- {/if} -->
	
	<!--{eval $qun_setting = ConfigHandler::get('qun_setting');}-->
	<!--{if $qun_setting['qun_open']}-->
	<!--微群 Begin-->
	<div class="menu">
		<div class="menu_wq">
			<b class="menu_wqb_c">微群</b>
			<div class="menu_wqb">
				<div class="menu_wqbox" style="width:210px;">
					<div class="menu_tb" style="width:210px;">
						<span style="float:left; padding-left:5px;">选择你要发布到的群</span>
						<sub class="menu_wqb_c1"></sub>
					</div>
					<div class="wcontent" id="wcontent_wp"></div>
				</div>
			</div>
		</div>
	</div>
	<!--微群 End-->
	<!--{/if}-->
	
	
	<!--长文 Begin-->
	<div class="menu">
		<div class="menu_cw">
			<b class="menu_cwb_c">长文</b>
			<div class="menu_cwb">
				<div class="menu_cwbox">
					<div class="menu_cwtb">
						<span style="float:left; padding-left:5px;">发布微博长文</span>
						<sub class="menu_cwb_c1"></sub>
					</div>
					<div class="wcontent" id="wcontent_cw"><p>正在加载...</p></div>
				</div>
			</div>
		</div>
	</div>
	<!--长文 End-->
	
	<!--分类选择信息 Begin-->
	<div class="menu">
		<select id="type" name="type">
		<option value="1" id="ee">公告</option>
		<option value="1" id="ee">建议</option>
		<option value="1" id="ee">留言</option>
		</select>
			<!--<b class="menu_cwb_c">随便说说</b>-->

	</div>
	<!--分类选择信息 End-->
	
	<!--分类 Begin 
	<!--{eval $fenlei_setting=ConfigHandler::get('fenlei_setting')}-->
	<!--{if $fenlei_setting == 1}-->
	<div class="menu">
		<div class="menu_x">
			<b class="menu_xb_c">分类</b>
			<div class="menu_xb">
				<div class="menu_xbox">
					<p class="stitle">
					<b id="vote2_content1" class="vhover2" onclick="setTab2('vote2_content',1,2)">新的分类</b>
					<b id="vote2_content2" onclick="setTab2('vote2_content',2,2);getMyFenleiList(1);">我发布的分类</b>
					<sub class="menu_xb_c1"></sub>
					</p>
					<div class="vcontent" id="con2_vote2_content_1">
					<p>正在加载...</p>
					</div>
					<div class="vcontent vote_conLi" id="con2_vote2_content_2" style="display:none;">
					<p>正在加载...</p>
					</div>
				</div>
			</div>
		</div>
	</div>
	<!--{/if}-->
	 分类 End-->
	
	<!--{hook/global_publish_extra1}-->
</div>
<div class="box_4">
	<!--{eval if ($this->Get[mod] == 'tag') $type = 'tagview' ;elseif ($this->Get[mod] == 'member') $type = 'tohome';elseif ($this->Get[mod] == 'vote') $type='app'; else $type = $params[code];}-->
	<!--{eval $type = $type ? $type : $this->Code;}-->
	<input type="button" class="indexBtn" id="publishSubmit" title="按Ctrl+Enter直接发布"/>
	
	<!--这边的判断主要是为了在应用中使用微博发布框-->
	<!--{if !in_array($this->Get['mod'], array('qun'))}-->
		<div class="box_4_open" id="weibo_syn_wp">
		<!--{if $this->Config[sina_enable] && sina_weibo_init()}-->
		{eval echo sina_weibo_syn();}
		<!--{/if}-->
		<!--{if $this->Config[qqwb_enable] && qqwb_init()}-->
		{eval echo qqwb_syn();}
		<!--{/if}-->
		<!--{if $this->Config[kaixin_enable] && kaixin_init()}-->
		{eval echo kaixin_syn_html();}
		<!--{/if}-->
		<!--{if $this->Config[renren_enable] && renren_init()}-->
		{eval echo renren_syn_html();}
		<!--{/if}-->
		</div>
	<!--{else}-->
		<div class="box_4_open"><input id="chk_toweibo" type="checkbox" onclick="selectAppTopicType(this.id, {toid:'topic_type', defTopicType:'qun'})">分享到微博 
		<script language="javascript">
			$('#topic_type').val('qun');
		</script>
		</div>
	<!--{/if}-->	
</div>

</div>
</div>
<script type="text/javascript">		
		$("#i_already").bind('focus', function(){
		   $('#tigBox_2').css('visibility', 'visible');
		   var i=0;
		   setTimeout(function(){i+=1; $('#tigBox_2').css('visibility', 'hidden'); },5000);
		});
		
		$("#publishSubmit").bind('click',function() {
			publishSubmit('i_already',0,'{$type}','topic_type','','',$('#mapp_item').val(),$('#mapp_item_id').val());
			return false;
		});
		$(document).ready(function(){
			initAiInput('i_already');
		});
		/*
		$("#i_already").bind('keydown',function(event) {
			event = event || window.event;
			if (event.keyCode == 13 && event.ctrlKey) {
				$("#publishSubmit").click();
			};
		});*/
</script>

